package com.xdf.whiteaccount.service;
import com.xdf.whiteaccount.utils.Example;
import com.xdf.whiteaccount.entity.GjrkbillCp;
import java.util.List;
import java.util.Optional;

/**
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2023-12-1 10:11:33
 */
public interface GjrkbillCpService {
    GjrkbillCp insert(GjrkbillCp record);

    GjrkbillCp insertSelective(GjrkbillCp record);

    List<GjrkbillCp> multiInsert(List<GjrkbillCp> list);

    int updateByPrimaryKey(GjrkbillCp record);

    int updateByPrimaryKeySelective(GjrkbillCp record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer B_ItemID);
    // 根据主键查询
    GjrkbillCp selectByPrimaryKey(Integer B_ItemID);
    // 根据主键作废
    int setVoid(Integer B_ItemID);

    List<GjrkbillCp> selectAll();

    GjrkbillCp save(GjrkbillCp record);
    List<GjrkbillCp> multiSave(List<GjrkbillCp> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(GjrkbillCp record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default GjrkbillCp fullFill(GjrkbillCp record){
        return record;
    }

    default void doBeforeInsert(GjrkbillCp record){}
    default void doAfterInsert(GjrkbillCp record){}
    List<GjrkbillCp> selectByExample(Example<GjrkbillCp> example);
    GjrkbillCp moveBill(Integer id, String moveBillFlag);
    //=================以上是自动生成的代码，自定义代码请写在下面==================
    // 根据主键批量获取数据
    List<GjrkbillCp> selectByPrimaryKeyList(List<Integer> idList);
    GjrkbillCp scanOneQR(Integer jrkId, Integer deviceId);
    List<GjrkbillCp> scanShelvesQR(String barcode, Integer deviceId);
    int updateDeviceId8ShelvesQR(String barcode, Integer deviceId);
    boolean prepared4FH(GjrkbillCp record);
    int clearPDADeviceId8PrimaryKey(Integer id);
    int clearPDADeviceId8Barcode(String barcode);
    int clearFPDIDBatch(Integer cpBillfhId);
    int clearFPDIDOne(Integer jrkId);
    int clearPDADeviceId8ScanId(Integer scanId);
}